﻿@using CuongHanh
@using CuongHanh.Context
@using CuongHanh.Models
@using CuongHanh.Models.View
@model IEnumerable<CuongHanh.Models.View.SubCategoryView>
@{

    ViewBag.Title = "Đá mỹ nghệ";
    Layout = "~/Views/Shared/_StoneLayoutDetail.cshtml";
    string sXemThem = Html.GetResource("xemthem");
}
<!-- End g-catalogue-box-->
<div class="clear">
</div>
<div class="medium-main-contain">
    @foreach (SubCategoryView item in Model)
    {
        string subCategoryUrl = UrlManager.LinkWoodSubCategory(item.Id,
                item.Name,
                item.CategoryName);

        <div class="g-top-product">
            <div class="title-g-product">
                <h2>
                    @item.Name
                </h2>
                <a class="g-view" href="@subCategoryUrl">@sXemThem</a>
                <div class="clear">
                </div>
            </div>
            @foreach (ProductView product in item.ProductView)
            {
                string productUrl = UrlManager.LinkStoneProductDetail(product.Id,
                        product.Name.ToUrlName());
                <div class="g-product">
                    <div class="g-imgproduct">
                        <a href="@productUrl">
                            <img src="@Url.Content("~/Content/Images/Small/" + product.Image)" />
                        </a>
                    </div>
                    <h3 class="g-name-product">
                        <a href="@productUrl">@product.Name</a>
                    </h3>
                    <span class="price">@AppUtil.FormatNumber(product.Price) VND </span>
                </div>
            }
        </div>
        <div class="clear"> </div>
        <!-- End g-top-product-->
    }
</div>
<div class="clear">
</div>